package main

import (
	"beego_test/database"
	_ "beego_test/routers"
	beego "github.com/astaxie/beego"
)

func main() {
	// 初始化数据库
	database.InitDatabase()
	if beego.BConfig.RunMode == "dev" {
		beego.BConfig.WebConfig.DirectoryIndex = true
		beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	}
	beego.Run()
}
